
def gauss():
    c, r = 0, 0
    while c < n:
        t = r
        for i in range(r, n):
            if a[i][c]:
                t = i
                break
        if not a[t][c]:
            c += 1
            continue
        a[t], a[r] = a[r], a[t]
        for i in range(r + 1, n):
            if a[i][c]:
                for j in range(n, c - 1, -1):
                    a[i][j] ^= a[r][j]
        r += 1
        c += 1
    if r < n:
        for i in range(r, n):
            if a[i][n]:
                return 2
        return 1

    for i in range(n - 1, -1, -1):
        for j in range(i + 1, n):
            a[i][n] ^= a[i][j] * a[j][n]
    return [a[i][n] for i in range(n)]


n = int(input())
a = [list(map(int, input().split())) for _ in range(n)]
t = gauss()
if t == 1:
    print('Multiple sets of solutions')
elif t == 2:
    print('No solution')
else:
    for i in range(len(t)):
        print(t[i])
